3d48780b8d523a22852cfe1048cdf09dc7b0537d,prism/src/prism/ExplicitFiles2MTBDD.java,ExplicitFiles2MTBDD,allocateDDVars,#,374
Before Change
// allocate nondeterministic variables
if (modelType == ModelType.MDP) {
for (i = 0; i < maxNumChoices; i++) {
v = JDD.Var(ddVarsUsed++);
ddChoiceVars[i] = v;
ddVarNames.add("l" + i);
}
}
// allocate dd variables for module variables (i.e. rows/cols)
// go through all vars in order (incl. global variables)
// so overall ordering can be specified by ordering in the input file
for (i = 0; i < numVars; i++) {
// get number of dd variables needed
// (ceiling of log2 of range of variable)
n = varList.getRangeLogTwo(i);
// add pairs of variables (row/col)
for (j = 0; j < n; j++) {
// new dd row variable
vr = JDD.Var(ddVarsUsed++);
// new dd col variable
vc = JDD.Var(ddVarsUsed++);
varDDRowVars[i].addVar(vr);
varDDColVars[i].addVar(vc);
// add names to list
ddVarNames.add(varList.getName(i) + "." + j);
ddVarNames.add(varList.getName(i) + "'." + j);
}
}
}
After Change
// new dd row variable
varDDRowVars[i].addVar(modelVariables.allocateVariable(varList.getName(i) + "." + j));
// new dd col variable
varDDColVars[i].addVar(modelVariables.allocateVariable(varList.getName(i) + "'." + j));
}
}
}